import type {App} from "vue";
import {createPinia} from "pinia";
import piniaPersistedState from 'pinia-plugin-persistedstate';

const store = createPinia();
store.use(piniaPersistedState); // 使用持久化插件
// 全局注册 store
export function setupStore(app: App<Element>) {
    app.use(store);
}

export * from "./modules/app";
export * from "./modules/permission";
export * from "./modules/settings";
export * from "./modules/tags-view";
export * from "./modules/user";
export * from "./modules/dict";
export * from "./modules/analyse";
export * from "./modules/lecture";
export * from "./modules/router";
export * from "./modules/trust";
export {store};
